package com.fivestar.finance.app.bean.resp;

import java.io.Serializable;
import java.util.List;

/**
 * 分页实体类，封装非也数据，页脚数据等
 *
 * @author hjd
 * @version V1.0.0
 * @Date 16/6/2 下午2:48
 */
public class DataPage<T> implements Serializable {


    /**
     * 默认的序列化版本 id.
     */
    private static final long serialVersionUID = 1L;


    /**
     * 查询结果总记录数.
     */
    private int totalRecords;

    /**
     * 当前页码.
     */
    private int pageNo;

    /**
     * 总共页数.
     */
    private int pageCount;


    int begin;
    int end;
    int length;

    private List<T> listData;

    public int getBegin() {
        return begin;
    }

    public void setBegin(int begin) {
        this.begin = begin;
    }

    public int getEnd() {
        return end;
    }

    public void setEnd(int end) {
        this.end = end;
    }

    public int getLength() {
        return length;
    }

    public void setLength(int length) {
        this.length = length;
    }


    public int getTotalRecords() {
        return totalRecords;
    }

    public void setTotalRecords(int totalRecords) {
        this.totalRecords = totalRecords;
    }

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageCount() {
        return pageCount;
    }

    public void setPageCount(int pageCount) {
        this.pageCount = pageCount;
    }

    public List<T> getListData() {
        return listData;
    }

    public void setListData(List<T> listData) {
        this.listData = listData;
    }


    @Override
    public String toString() {
        return "DataPage{" +
                "totalRecords=" + totalRecords +
                ", pageNo=" + pageNo +
                ", pageCount=" + pageCount +
                ", begin=" + begin +
                ", end=" + end +
                ", length=" + length +
                ", listData=" + listData +
                '}';
    }
}
